package org.gukewen.feign.fallback;

import org.gukewen.feign.ProductFeignClient;
import org.gukewen.product.bean.Product;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Component
public class ProductFeifnClienFallback implements ProductFeignClient {

    @Override
    public Product getProductById(Long productId) {
        System.out.println("兜底回调------");
        Product product = new Product();
        product.setId(productId);
        product.setProductName("未知商品");
        product.setPrice(new BigDecimal(0));
        product.setNum(100);
        return product;
    }
}
